#import "HorizonSereneController.h"
        
#import "HorizonSereneModel.h"
#import "HorizonSereneCell.h"
#import "Masonry.h"

@interface HorizonSereneController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *crispTableView;
@property (nonatomic, strong) NSMutableArray *yieldXenophobeDatas;

@end

@implementation HorizonSereneController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self circulateDoodleInitlyout];
	[self nirvanaXylophoneDriftwoodloadData];
}


//: 获取数据模型
- (void)nirvanaXylophoneDriftwoodloadData {
	
}

- (void)circulateDoodleInitlyout {
    self.crispTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.crispTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
    self.crispTableView.estimatedRowHeight = 0;
    self.crispTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.crispTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
    self.crispTableView.delegate = self;
    self.crispTableView.dataSource = self;
	self.crispTableView.rowHeight = 82;
    self.crispTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
    self.crispTableView.showsVerticalScrollIndicator = NO;
    self.crispTableView.showsHorizontalScrollIndicator = NO;
    self.crispTableView.backgroundColor = UIColor.clearColor;
    [self.crispTableView registerClass:[HorizonSereneCell class] forCellReuseIdentifier:NSStringFromClass([HorizonSereneCell class])];
    [self.view addSubview:self.crispTableView];
    [self.crispTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.equalTo(self.view);
        make.top.equalTo(self.view);
        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
    }];
}

//: 懒加载数据模型数组
- (NSMutableArray *)yieldXenophobeDatas {
	if (!_yieldXenophobeDatas) {
		_yieldXenophobeDatas = [NSMutableArray array];
	}
	return _yieldXenophobeDatas;
}

#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.yieldXenophobeDatas.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    HorizonSereneCell *fableBlaze = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([HorizonSereneCell class])];
    if (fableBlaze == nil) {
        fableBlaze = [[HorizonSereneCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([HorizonSereneCell class])];
    }
    fableBlaze.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return fableBlaze;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
